<script setup lang="ts">
import { useAppStore } from '@/store'
import { ElMessage } from 'element-plus'
const { count, doubleCount } = storeToRefs(useAppStore())
const { increment } = useAppStore()

const router = useRouter()

const handleClick = () => {
    increment()
    ElMessage({
        message: `count:${count.value}--------doubleCount:${doubleCount.value}`,
        type: 'success',
    })
    if (count.value >= 5) {
        router.push({
            name: 'Login'
        })
    }
}
</script>

<template>
    <div>
        首页
        <el-button type="primary">按钮</el-button>
        <br />
        count: {{ count }}
        <br />
        doubleCount: {{ doubleCount }}
    </div>

</template>
